package com.jay.lang.management.intf;

import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
import java.util.List;
import java.util.Map;

public class RuntimeMXBeanIntf {
	public static void main(String[] args) {
		RuntimeMXBean mxbean = ManagementFactory.getRuntimeMXBean();
		System.out.println(mxbean.getBootClassPath());
		System.out.println(mxbean.getClassPath());
		System.out.println(mxbean.getName());
		System.out.println(mxbean.getLibraryPath());
		System.out.println(mxbean.toString());
		System.out.println(mxbean.getClass());
		System.out.println(mxbean.getObjectName());
		System.out.println(mxbean.getManagementSpecVersion());
		System.out.println(mxbean.getSpecName());
		System.out.println(mxbean.getSpecVendor());
		System.out.println(mxbean.getSpecVersion());
		System.out.println(mxbean.getStartTime());
		System.out.println(mxbean.getUptime());
		System.out.println(mxbean.getVmName());
		System.out.println(mxbean.getVmVendor());
		System.out.println(mxbean.getVmVersion());
		System.out.println(mxbean.isBootClassPathSupported());

		List<String> sl = mxbean.getInputArguments();
		for (String s : sl) {
			System.out.println(s);
		}

		Map<String, String> props = mxbean.getSystemProperties();
		for (String s : props.keySet()) {
			System.out.println(s + ":" + props.get(s));
		}
	}
}
